package com.baicun.wish.spiders;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

/**
 * @author baicun
 * @description
 */
public class ElementUtil {

    public static boolean isExist(WebDriver webDriver, By by) {
        try {
            webDriver.findElement(by);
            return true;
        } catch (Exception e) {
//            e.printStackTrace();
            System.out.println("不存在此元素");
            return false;
        }
    }

}
